// *************************************************************************************************
//
// MK3D Engine
// --------------------------------------
// Copyright (C) 2007-2011 Zeb (mailto: zebbey@gmail.com)
//
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//
// *************************************************************************************************

#ifndef __H_MK_UI_DEFINE__
#define __H_MK_UI_DEFINE__

namespace MK3DE
{
    enum UI_CONTROL_TYPE
    {
        UICT_WINDOW,
        UICT_STATIC,
        UICT_BUTTON,
        UICT_EDIT_BOX,
        UICT_COMBO_BOX,
        UICT_CHECK_BOX,
        UICT_LIST_BOX,
    };

    enum UI_INPUT_EVENT_TYPE
    {
        // mouse event.
        UI_IET_LBUTTON_DOWN,
        UI_IET_LBUTTON_UP,
        UI_IET_LBUTTON_DCLICK,
        UI_IET_MOUSE_MOVE,

        // keyboard event.
        UI_IET_CHAR,
    };

    enum UI_ALIGN_TYPE_X
    {
        UIATX_LEFT,
        UIATX_RIGHT,
        UIATX_CENTER,
    };

    enum UI_ALIGN_TYPE_Y
    {
        UIATY_TOP,
        UIATY_BOTTOM,
        UIATY_CENTER,
    };

    struct UIInputEvent
    {
        UI_INPUT_EVENT_TYPE type;

        union
        {
            struct
            {
                D3DXVECTOR2 pos;
            };

            struct
            {
                BOOL ime;
                wchar_t key;
            };
        };
    };

    enum UI_EVENT_TYPE
    {
        UIET_BUTTON_CLICK,
        UIET_EDIT_BOX_CHANGED,
    };

    class CUIWindow;
    struct UIEvent
    {
        UI_EVENT_TYPE type;
        CUIWindow* win;
    };
};

#endif // __H_MK_UI_DEFINE__
